using System;
using System.Collections;
using System.ComponentModel;
using System.Web.UI.WebControls;

namespace SBPweb.Controls.Web
{
	/// <summary>
	/// This interface describes a sortable list
	/// </summary>
	public interface IEntityListSource
	{
		/// <summary>
		/// Returns the type of the items
		/// </summary>
		Type ItemType
		{
			get;
		}

		/// <summary>
		/// Returns the items of the list as an array
		/// </summary>
		Array AsArray
		{
			get;
		}

		/// <summary>
		/// Returns the list as an IList
		/// </summary>
		IList AsList
		{
			get;
		}

		/// <summary>
		/// Sorts the list
		/// </summary>
		/// <param name="expression">Comparison expression</param>
		/// <param name="direction">Direction of sorting</param>
		void Sort(string expression, SortDirection direction);
	}
}
